/*
*********************************************************************************************************
*                                               MODULE
*********************************************************************************************************
*/

#ifndef  MB_OS_MODULE_PRESENT
#define  MB_OS_MODULE_PRESENT


/*
*********************************************************************************************************
*                                            INCLUDE FILES
*********************************************************************************************************
*/
#include <rtthread.h>

/*
*********************************************************************************************************
*                                    CONFIGURE STANDARD DATA TYPES
*********************************************************************************************************
*/
typedef  void                   CPU_VOID;
typedef  char                   CPU_CHAR;                        /*  8-bit character                                     */
typedef  rt_uint8_t             CPU_BOOLEAN;                     /*  8-bit boolean or logical                            */
typedef  rt_uint8_t             CPU_INT08U;                      /*  8-bit unsigned integer                              */
typedef  rt_int8_t              CPU_INT08S;                      /*  8-bit   signed integer                              */
typedef  rt_uint16_t            CPU_INT16U;                      /* 16-bit unsigned integer                              */
typedef  rt_int16_t             CPU_INT16S;                      /* 16-bit   signed integer                              */
typedef  rt_uint32_t            CPU_INT32U;                      /* 32-bit unsigned integer                              */
typedef  rt_int32_t             CPU_INT32S;                      /* 32-bit   signed integer                              */
typedef  rt_uint64_t            CPU_INT64U;                      /* 64-bit unsigned integer                              */
typedef  rt_int64_t             CPU_INT64S;                      /* 64-bit   signed integer                              */

typedef  float                  CPU_FP32;                        /* 32-bit floating point                                */
typedef  double                 CPU_FP64;                        /* 64-bit floating point                                */


typedef  volatile  CPU_INT08U   CPU_REG08;                       /*  8-bit register                                      */
typedef  volatile  CPU_INT16U   CPU_REG16;                       /* 16-bit register                                      */
typedef  volatile  CPU_INT32U   CPU_REG32;                       /* 32-bit register                                      */
typedef  volatile  CPU_INT64U   CPU_REG64;                       /* 64-bit register                                      */


/*
*********************************************************************************************************
*                                               EXTERNS
*********************************************************************************************************
*/

#ifdef   MB_OS_MODULE
#define  MB_OS_EXT
#else
#define  MB_OS_EXT  extern
#endif

/*
*********************************************************************************************************
*                                               DEFINES
*********************************************************************************************************
*/


/*
*********************************************************************************************************
*                                             DATA TYPES
*********************************************************************************************************
*/


/*
*********************************************************************************************************
*                                        CONFIGURATION ERRORS
*********************************************************************************************************
*/

#ifndef  MB_OS_CFG_RX_TASK_PRIO
#error  "MODBUS Missing Rx Task's MB_OS_CFG_RX_TASK_PRIO."
#endif

#ifndef  MB_OS_CFG_RX_TASK_STK_SIZE
#error  "MODBUS Missing Rx Task's MB_OS_CFG_RX_TASK_STK_SIZE."
#endif

#if      (MODBUS_CFG_MASTER_EN == DEF_ENABLED)
#if      !defined(RT_USING_SEMAPHORE)
#error  "MODBUS Master requires uC/OS-III Semaphore Services."
#error  "... It needs at least MODBUS_CFG_MAX_CH semaphores."
#endif
#endif


/*
*********************************************************************************************************
*                                             MODULE END
*********************************************************************************************************
*/

#endif                                                          /* End of MB_OS module                                */
